<template>
  <div class="forgetstep1">
    <div class="stepHead">
      <el-row :gutter="2">
        <el-col :span="4">
          <div class="RetrieveText">找回登录密码</div>
        </el-col>
        <el-col :span="7">
          <div class="mycolor color1"></div>
          <div class="f2">第一步：填写账号</div>
        </el-col>
        <el-col :span="7">
          <div class="mycolor color2"></div>
          <div class="a7">第二步：验证并设置新密码</div>
        </el-col>
        <el-col :span="6">
          <div class="mycolor color3"></div>
          <div class="a7">第三步：设置成功</div>
        </el-col>
      </el-row>
    </div>
    <div class="content">
      <p>请输入您的绑定手机或绑定邮箱</p>
      <el-form ref="ruleForm" :model="sizeForm" label-width="100px">
        <el-form-item label="手机/邮箱：">
          <el-input v-model="sizeForm.telmail" placeholder="请输入您的绑定手机或绑定邮箱"></el-input>
        </el-form-item>
      </el-form>
      <el-button type="warning" @click="nextStep" :disabled="disabled">下一步</el-button>
      <!-- <div class="mybtn" :disabled="true">下一步</div> -->
    </div>
  </div>
</template>

<script>
export default {
  name: 'forgetStep1',
  data() {
    return {
      sizeForm: {
        telmail: '',
      }
    }
  },
  computed: {
    disabled() {
      if (this.sizeForm.telmail) {
        return false
      } else {
        return true
      }
    }
  },
  methods: {
    // 发送验证码
    async nextStep() {

      let data = this.sizeForm.telmail
      console.log(data)
      let res = await this.$http({
        method: 'post',
        url:'index/api/verifyAndSendCode',
        data:{
          data
        }
      })

      if (res.data.State.Code == 200) {
        console.log(res)
        this.$router.push({
          name: 'forgetStep2',
          params: {
            data
          }
        })
      }

    }
  },

}
</script>

<style lang='scss' scoped>
.forgetstep1 {
  padding-bottom: 40px;
  border-bottom: 1px #e6e6e6 dashed;
  .stepHead {
    height: 134px;
    border-bottom: 1px solid #e6e6e6;
    .el-row {
      width: 786px;
      padding-left: 94px;
      padding-top: 50px;
      .RetrieveText {
        font-size: 16px;
        font-weight: bold;
        color: #2f2f2f;
      }
      .mycolor {
        height: 8px;
        margin-top: 6.5px;
      }
      .color1 {
        background-color: #ff9c00;
      }
      .color2,
      .color3 {
        background-color: #eeeeee;
      }
      .f2,
      .a7 {
        font-size: 14px;
        margin-top: 15px;
      }
      .f2 {
        color: #2f2f2f;
      }
      .a7 {
        color: #a7a7a7;
      }
    }
  }
  .content {
    margin-left: 94px;
    p {
      font-size: 14px;
      font-weight: bold;
      line-height: 130px;
      margin-top: 18px;
    }
    .el-form {
      width: 400px;
    }
    .el-button {
      margin-left: 200px;
    }
    // .mybtn{
    //   width: 88px;
    //   height: 35px;
    //   background-color: #ff9c00;
    //   text-align: center;
    //   line-height: 35px;
    //   color: #fff;
    //   font-size: 14px;
    //   font-weight: bold;
    //   cursor: pointer;
    //   margin-left: 200px;
    //   transition: all ease-in .3s;
    //   &:hover{
    //     border-radius: 4px;
    //     background-color: #ff9d00de;
    //   }
    // }
  }
}
</style>